package com.mycompany.core.profile.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.broadleafcommerce.profile.core.domain.Customer;
import org.broadleafcommerce.profile.core.domain.CustomerImpl;

@Entity
@Table(name="HC_CUSTOMER")
public class HCCustomerImpl extends CustomerImpl implements HCCustomer{
	private static final long serialVersionUID = 6545097668293683751L;
	
	
	
	protected Customer customer;


	@Column(name="NUM_SAUCES_BOUGHT")
	protected Integer numSaucesBought=0;

	@Column(name="TOTAL_HEAT_RATIMG")
	protected Integer totalHeatRating=0;


	@Column(name = "SECURITY_QUESTION")
	protected String securityQuestion ;

	@Column(name = "SECURITY_ANSWER")
	protected String securityAnswer ;

	/*public String getSecurityQuestion() {
		return securityQuestion;
	}

	public void setSecurityQuestion(String securityQuestion) {
		this.securityQuestion = securityQuestion;
	}

	public String getSecurityAnswer() {
		return securityAnswer;
	}

	public void setSecurityAnswer(String securityAnswer) {
			this.securityAnswer = securityAnswer;	
	}
	 */
	


	@Override
	public Integer getAverageHeatRatingBought() {

		if (numSaucesBought == null || numSaucesBought == 0) {
			return 0;
		}
		return totalHeatRating / numSaucesBought;
	}

	@Override
	public Integer getNumSaucesBought() {
		return numSaucesBought;
	}

	@Override
	public void setNumSaucesBought(Integer numSaucesBought) {
		this.numSaucesBought = numSaucesBought;

	}

	@Override
	public Integer getTotalHeatRating() {
		return totalHeatRating;
	}

	@Override
	public void setTotalHeatRating(Integer totalHeatRating) {
		this.totalHeatRating = totalHeatRating;

	}

	@Override
	public String getSecurityQuestion() {

		return securityQuestion;
	}

	@Override
	public void setSecurityQuestion(String securityQuestion) {
		this.securityQuestion=securityQuestion;

	}

	@Override
	public String getSecurityAnswer() {

		return securityAnswer;
	}

	@Override
	public void setSecurityAnswer(String securityAnswer) {
		this.securityAnswer=securityAnswer;
		
	}


	



}
